#include <stdio.h>
void swap(int *a,int *b){
    int tmp = *a;
    *a = *b;
    *b = tmp;
}
void swap2(int a,int b){
    int tmp = a;
    a = b;
    b = tmp;
}
int main(){
    int a=1;
    int b=2;
    printf("num a = %d,num b = %d\n",a,b);
    printf("after swap2\n");
    swap2(a,b);
     printf("num a = %d,num b = %d\n",a,b);

     printf("after swap1\n");
    
    swap(&a,&b);
     printf("num a = %d,num b = %d\n",a,b);
    return 0;
}
